<template>
	<view class="radio-box" @tap="$emit('change')">
		<image class="radio-icon" :src="isSelect ? selectIcon : icon" mode="aspectFit"></image>
		<text class="radio-text">{{title}}</text>
	</view>
</template>

<script setup>
	
	defineEmits(['change'])
	defineProps({
		//提示文字
		title:{
			type:String,
			default:'个体工商户'
		},
		//是否选中
		isSelect:{
			type:Boolean,
			default:false
		},
		//默认的图片
		icon:{
			type:String,
			default:'/static/check_icon_n.png'
		},
		//选择的图片
		selectIcon:{
			type:String,
			default:'/static/check_icon_p.png'
		}
	})
</script>

<style lang="scss" scoped>
.radio-box{
	display: flex;
	align-items: center;
	.radio-icon{
		width: 26rpx;
		height: 26rpx;
	}
	.radio-text{
		color: $xh-title-color;
		margin-left: 10rpx;
	}
}
</style>